#ifndef C2C_INET_ADDR_H
#define C2C_INET_ADDR_H


#include <string>
#include <stdint.h>

class CInterAddr
{
public:
    CInterAddr();
    CInterAddr(uint32_t dwIpAddress, uint16_t wPort);
    CInterAddr(const std::string& strIpAddress, uint16_t wPort);
    void InitAddr(uint32_t dwIpAddress, uint16_t wPort);
    uint32_t getAddress() const;
    const char *getHost() const;
    uint16_t getPort() const;
    CInterAddr(const CInterAddr &);
    CInterAddr operator =(const CInterAddr&);
    // scott overloaded '=='
    bool operator ==(const CInterAddr& right) const
    {
	return (*this).getAddress() == right.getAddress() &&
	    (*this).getPort() == right.getPort();
    }
private:
    char m_sBuffer[20];
    uint32_t m_dwIpAddress;
    uint16_t m_wPort;
};


#endif

